<template>
  <div class="xcx-page" v-html="templateStr"></div>
</template>

<script>
import openLaunch from '../../utils/openLaunch'
export default {
  name: 'wx_pages_share_wcx',
  data() {
    return {
      appId: '',
      path: '',
      templateStr: '',
    }
  },
  watch: {
    isReady(isReady) {
      if (isReady) {
        const { appid, path } = this.$route.query
        const $appId = appid
        const $path = decodeURIComponent(path)
        this.templateStr = openLaunch($appId, $path)
      }
    },
  },
}
</script>

<style lang="less" scoped>
.xcx-page {
  width: 100%;
  height: 100%;
}
</style>